package com.zhfj.entity;

import javax.persistence.*;

/**
 * Created on 2017/11/30.
 *
 * @author Jie
 */
@Entity
@Table(name = "Concern", schema = "EasyBlog", catalog = "")
public class ConcernEntity {
    private Integer id;
    private Integer fansId;
    private Integer beConcernId;
    private String beConcernUserName;
    private String beConcernUserPic;

    @Id
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "fans_id")
    public Integer getFansId() {
        return fansId;
    }

    public void setFansId(Integer fansId) {
        this.fansId = fansId;
    }

    @Basic
    @Column(name = "be_concern_id")
    public Integer getBeConcernId() {
        return beConcernId;
    }

    public void setBeConcernId(Integer beConcernId) {
        this.beConcernId = beConcernId;
    }

    @Basic
    @Column(name = "be_concern_user_name")
    public String getBeConcernUserName() {
        return beConcernUserName;
    }

    public void setBeConcernUserName(String beConcernUserName) {
        this.beConcernUserName = beConcernUserName;
    }

    @Basic
    @Column(name = "be_concern_user_pic")
    public String getBeConcernUserPic() {
        return beConcernUserPic;
    }

    public void setBeConcernUserPic(String beConcernUserPic) {
        this.beConcernUserPic = beConcernUserPic;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ConcernEntity that = (ConcernEntity) o;

        if (id != that.id) return false;
        if (fansId != null ? !fansId.equals(that.fansId) : that.fansId != null) return false;
        if (beConcernId != null ? !beConcernId.equals(that.beConcernId) : that.beConcernId != null) return false;
        if (beConcernUserName != null ? !beConcernUserName.equals(that.beConcernUserName) : that.beConcernUserName != null)
            return false;
        if (beConcernUserPic != null ? !beConcernUserPic.equals(that.beConcernUserPic) : that.beConcernUserPic != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (fansId != null ? fansId.hashCode() : 0);
        result = 31 * result + (beConcernId != null ? beConcernId.hashCode() : 0);
        result = 31 * result + (beConcernUserName != null ? beConcernUserName.hashCode() : 0);
        result = 31 * result + (beConcernUserPic != null ? beConcernUserPic.hashCode() : 0);
        return result;
    }
}
